//
//  LMOrderEnum.m
//  WelfareManager
//
//  Created by longmin on 17/3/24.
//  Copyright © 2017年 timtian. All rights reserved.
//

#import "LMOrderEnum.h"

@implementation LMOrderEnum

static LMOrderEnum * instance;

+ (id)allocWithZone:(struct _NSZone *)zone
{
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        instance = [super allocWithZone:zone];
    });
    
    return instance;
}

+ (instancetype)orderEnum {
    if (instance == nil) {
        instance = [[LMOrderEnum alloc] init];
    }
    return instance;
}

- (NSArray *)orderStates {
    if (_orderStates == nil) {
        NSString *plistPath = [[NSBundle mainBundle] pathForResource:@"OrderState" ofType:@"plist"];
        _orderStates = [[NSArray alloc] initWithContentsOfFile:plistPath];
        NSLog(@"%@",self.orderStates);
    }
    return _orderStates;
}

- (NSString *)orderState:(LMOrderState)state {
    return self.orderStates[state];
}

@end
